#include "usercredentialsdialog.h"
#include "ui_usercredentialsdialog.h"

UserCredentialsDialog::UserCredentialsDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::UserCredentialsDialog)
{
    ui->setupUi(this);
    connect(this, SIGNAL(accepted()), this, SLOT(onAccept()));
    connect(this, SIGNAL(rejected()), this, SLOT(onCancel()));
}

UserCredentialsDialog::~UserCredentialsDialog()
{
    delete ui;
}

void UserCredentialsDialog::onAccept()
{
    emit dataProvided(ui->uname->text(), ui->upass->text());
}

void UserCredentialsDialog::onCancel()
{
    emit cancelled();
}
